******SET YOUR DIRECTORY to ...\replication


clear all


///////////////////////////////////////////////////////////////////////////////////////////
///Collapse data at place-year level///////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////
use intermediatedata\data_ucr_ori, clear
drop *_cty_*

///Drop observations not inside any MSA, 418589/868611
drop if FMSA==.
///Drop observations inside MSA without city center, observation with missing: 42571/450022, observations with 0: 3532/450022
egen msawithcc=max(city_center), by(FMSA)
drop if msawithcc==0

///Aggregate data for rest of the city which is not the center
*Sum population in jurisdiction of ori at MSA level for non center
egen tot_ncc_oripop1_2=total(pop1) if city_center==0, by(FMSA year)  missing
egen tot_ncc_oripop1=max(tot_ncc_oripop1_2), by(FMSA year) 
egen tot_ncc_oripop_2=total(pop) if city_center==0, by(FMSA year)  missing
egen tot_ncc_oripop=max(tot_ncc_oripop_2), by(FMSA year) 
egen tot_ncc_oripop_corr_2=total(pop_corr) if city_center==0, by(FMSA year)  missing
egen tot_ncc_oripop_corr=max(tot_ncc_oripop_corr_2), by(FMSA year) 
drop tot_ncc_oripop1_2 tot_ncc_oripop_2 tot_ncc_oripop_corr_2
*Sum every crime at MSA level for non center
forvalues i=1/26{
egen totn_ncc_offensesunf_`i'c_2=total(totn_offensesunf_`i'c) if city_center==0, by(FMSA year)  missing
egen totn_ncc_offensesunf_`i'c=max(totn_ncc_offensesunf_`i'c_2), by(FMSA year)
gen totnpc_ncc_offensesunf_`i'c=totn_ncc_offensesunf_`i'c/tot_ncc_oripop
gen totnpcc_ncc_offensesunf_`i'c=totn_ncc_offensesunf_`i'c/tot_ncc_oripop_corr
egen totn_ncc_offenses_`i'c_2=total(totn_offenses_`i'c) if city_center==0, by(FMSA year)  missing
egen totn_ncc_offenses_`i'c=max(totn_ncc_offenses_`i'c_2), by(FMSA year)
gen totnpc_ncc_offenses_`i'c=totn_ncc_offenses_`i'c/tot_ncc_oripop
gen totnpcc_ncc_offenses_`i'c=totn_ncc_offenses_`i'c/tot_ncc_oripop_corr
egen totn_ncc_clearances_`i'c_2=total(totn_clearances_`i'c) if city_center==0, by(FMSA year)  missing
egen totn_ncc_clearances_`i'c=max(totn_ncc_clearances_`i'c_2), by(FMSA year)
gen totnpc_ncc_clearances_`i'c=totn_ncc_clearances_`i'c/tot_ncc_oripop
gen totnpcc_ncc_clearances_`i'c=totn_ncc_clearances_`i'c/tot_ncc_oripop_corr
egen totn_ncc_clearancesu18_`i'c_2=total(totn_clearancesu18_`i'c) if city_center==0, by(FMSA year)  missing
egen totn_ncc_clearancesu18_`i'c=max(totn_ncc_clearancesu18_`i'c_2), by(FMSA year)
gen totnpc_ncc_clearancesu18_`i'c=totn_ncc_clearancesu18_`i'c/tot_ncc_oripop
gen totnpcc_ncc_clearancesu18_`i'c=totn_ncc_clearancesu18_`i'c/tot_ncc_oripop_corr
drop totn_ncc_offensesunf_`i'c_2 totn_ncc_offenses_`i'c_2 totn_ncc_clearances_`i'c_2 totn_ncc_clearancesu18_`i'c_2
}
///Keep only observations of place which is city center and it is municipal jurisdiction crime, keep 300 places (16459 observations)
replace AGENTYPE=3 if ori=="OHCIP00" | ori=="NV00201" | ori=="INIPD00"
drop if city_center==.
drop if AGENTYPE==.
drop if city_center!=1 
drop if AGENTYPE!=3
///Create variable for city center
rename pop1 tot_cc_oripop1
rename pop tot_cc_oripop
rename pop_corr tot_cc_oripop_corr
forvalues i=1/26{
rename totn_offensesunf_`i'c totn_cc_offensesunf_`i'c_2
gen totnpc_cc_offensesunf_`i'c=totn_cc_offensesunf_`i'c/tot_cc_oripop
gen totnpcc_cc_offensesunf_`i'c=totn_cc_offensesunf_`i'c/tot_cc_oripop_corr
rename totn_offenses_`i'c totn_cc_offenses_`i'c
gen totnpc_cc_offenses_`i'c=totn_cc_offenses_`i'c/tot_cc_oripop
gen totnpcc_cc_offenses_`i'c=totn_cc_offenses_`i'c/tot_cc_oripop_corr
rename totn_clearances_`i'c totn_cc_clearances_`i'c
gen totnpc_cc_clearances_`i'c=totn_cc_clearances_`i'c/tot_cc_oripop
gen totnpcc_cc_clearances_`i'c=totn_cc_clearances_`i'c/tot_cc_oripop_corr
rename totn_clearancesu18_`i'c totn_cc_clearancesu18_`i'c
gen totnpc_cc_clearancesu18_`i'c=totn_cc_clearancesu18_`i'c/tot_cc_oripop
gen totnpcc_cc_clearancesu18_`i'c=totn_cc_clearancesu18_`i'c/tot_cc_oripop_corr
}
///Create Violent crimes
*Not center
egen totn_ncc_offenses_ass=rowtotal(totn_ncc_offenses_12c totn_ncc_offenses_13c totn_ncc_offenses_14c totn_ncc_offenses_15c) if year>=1964,  missing
gen totnpc_ncc_offenses_ass=totn_ncc_offenses_ass/tot_ncc_oripop if year>=1964
gen totnpcc_ncc_offenses_ass=totn_ncc_offenses_ass/tot_ncc_oripop_corr if year>=1964
egen totn_ncc_offenses_vc=rowtotal(totn_ncc_offenses_1c totn_ncc_offenses_3c totn_ncc_offenses_6c totn_ncc_offenses_11c),  missing
replace totn_ncc_offenses_vc=totn_ncc_offenses_vc-totn_ncc_offenses_16c if year>1973
replace totn_ncc_offenses_vc=totn_ncc_offenses_vc+totn_ncc_offenses_16c if year>=1977 & year<=1993 & FMSA==5600
gen totnpc_ncc_offenses_vc=totn_ncc_offenses_vc/tot_ncc_oripop
gen totnpcc_ncc_offenses_vc=totn_ncc_offenses_vc/tot_ncc_oripop_corr
*Center
egen totn_cc_offenses_ass=rowtotal(totn_cc_offenses_12c totn_cc_offenses_13c totn_cc_offenses_14c totn_cc_offenses_15c) if year>=1964,  missing
gen totnpc_cc_offenses_ass=totn_cc_offenses_ass/tot_cc_oripop if year>=1964
gen totnpcc_cc_offenses_ass=totn_cc_offenses_ass/tot_cc_oripop_corr if year>=1964
egen totn_cc_offenses_vc=rowtotal(totn_cc_offenses_1c totn_cc_offenses_3c totn_cc_offenses_6c totn_cc_offenses_11c),  missing
replace totn_cc_offenses_vc=totn_cc_offenses_vc-totn_cc_offenses_16c if year>1973
replace totn_cc_offenses_vc=totn_cc_offenses_vc+totn_cc_offenses_16c if year>=1977 & year<=1993 & ori=="NY03030"
gen totnpc_cc_offenses_vc=totn_cc_offenses_vc/tot_cc_oripop
gen totnpcc_cc_offenses_vc=totn_cc_offenses_vc/tot_cc_oripop_corr

///Illinois, not rape data between 1985 and 2012 
drop state
gen state=int(fipsplace_00/100000)
foreach var of varlist tot*_3c tot*_4c tot*_5c{
replace `var'=. if year>=1985 & year<2013 & state==17
}
drop state

///Label variable
label var totn_ncc_offenses_1c "ACT NUM MURDER, MSA not central city"
label var totn_ncc_offenses_2c "ACT NUM MANSLGHTR, MSA not central city"
label var totn_ncc_offenses_3c "ACT NUM RAPE TOTL, MSA not central city"
label var totn_ncc_offenses_4c "ACT NUM FORC RAPE, MSA not central city"
label var totn_ncc_offenses_5c "ACT NUM ATMPTD RAPE, MSA not central city"
label var totn_ncc_offenses_6c "ACT NUM ROBBRY TOTL, MSA not central city"
label var totn_ncc_offenses_7c "ACT NUM GUN ROBBERY, MSA not central city"
label var totn_ncc_offenses_8c "ACT NUM KNIFE ROBRY, MSA not central city"
label var totn_ncc_offenses_9c "ACT NUM OTH WPN ROB, MSA not central city"
label var totn_ncc_offenses_10c "ACT NUM STR ARM ROB, MSA not central city"
label var totn_ncc_offenses_11c "ACT NUM ASSLT TOTAL, MSA not central city"
label var totn_ncc_offenses_12c "ACT NUM GUN ASSAULT, MSA not central city"
label var totn_ncc_offenses_13c "ACT NUM KNIFE ASSLT, MSA not central city"
label var totn_ncc_offenses_14c "ACT # OTH WPN ASSLT, MSA not central city"
label var totn_ncc_offenses_15c "ACT # HND/FEET ASLT, MSA not central city"
label var totn_ncc_offenses_16c "ACT NUM # SIMPLE ASSLT, MSA not central city"
label var totn_ncc_offenses_17c "ACT NUM # BURGLARY TOTL, MSA not central city"
label var totn_ncc_offenses_18c "ACT NUM # FORCE ENTRY, MSA not central city"
label var totn_ncc_offenses_19c "ACT NUM # ENTRY-NO FORC, MSA not central city"
label var totn_ncc_offenses_20c "ACT NUM # ATT BURGLARY, MSA not central city"
label var totn_ncc_offenses_21c "ACT NUM # LARCENY TOTAL, MSA not central city"
label var totn_ncc_offenses_22c "ACT NUM # VHC THEFT TOT, MSA not central city"
label var totn_ncc_offenses_23c "ACT NUM # AUTO THEFT, MSA not central city"
label var totn_ncc_offenses_24c "ACT NUM # TRCK/BUS THFT, MSA not central city"
label var totn_ncc_offenses_25c "ACT NUM # OTH VHC THEFT, MSA not central city"
label var totn_ncc_offenses_26c "ACT NUM # ALL FIELDS, MSA not central city"
label var totn_ncc_offenses_ass "ACT NUM # AGGRAVATED ASSAULT, MSA not central city"
label var totn_ncc_offenses_vc "ACT NUM # VIOLENT CRIME, MSA not central city"
label var totnpc_ncc_offenses_1c "ACT PC MURDER, MSA not central city per capita"
label var totnpc_ncc_offenses_2c "ACT PC MANSLGHTR, MSA not central city per capita"
label var totnpc_ncc_offenses_3c "ACT PC RAPE TOTL, MSA not central city per capita"
label var totnpc_ncc_offenses_4c "ACT PC FORC RAPE, MSA not central city per capita"
label var totnpc_ncc_offenses_5c "ACT  PC ATMPTD RAPE, MSA not central city per capita"
label var totnpc_ncc_offenses_6c "ACT  PC ROBBRY TOTL, MSA not central city per capita"
label var totnpc_ncc_offenses_7c "ACT  PC GUN ROBBERY, MSA not central city per capita"
label var totnpc_ncc_offenses_8c "ACT  PC KNIFE ROBRY, MSA not central city per capita"
label var totnpc_ncc_offenses_9c "ACT  PC OTH WPN ROB, MSA not central city per capita"
label var totnpc_ncc_offenses_10c "ACT  PC STR ARM ROB, MSA not central city per capita"
label var totnpc_ncc_offenses_11c "ACT  PC ASSLT TOTAL, MSA not central city per capita"
label var totnpc_ncc_offenses_12c "ACT  PC GUN ASSAULT, MSA not central city per capita"
label var totnpc_ncc_offenses_13c "ACT  PC KNIFE ASSLT, MSA not central city per capita"
label var totnpc_ncc_offenses_14c "ACT  OTH WPN ASSLT, MSA not central city per capita"
label var totnpc_ncc_offenses_15c "ACT  HND/FEET ASLT, MSA not central city per capita"
label var totnpc_ncc_offenses_16c "ACT PC SIMPLE ASSLT, MSA not central city per capita"
label var totnpc_ncc_offenses_17c "ACT PC BURGLARY TOTL, MSA not central city per capita"
label var totnpc_ncc_offenses_18c "ACT PC FORCE ENTRY, MSA not central city per capita"
label var totnpc_ncc_offenses_19c "ACT PC ENTRY-NO FORC, MSA not central city per capita"
label var totnpc_ncc_offenses_20c "ACT PC ATT BURGLARY, MSA not central city per capita"
label var totnpc_ncc_offenses_21c "ACT PC LARCENY TOTAL, MSA not central city per capita"
label var totnpc_ncc_offenses_22c "ACT PC VHC THEFT TOT, MSA not central city per capita"
label var totnpc_ncc_offenses_23c "ACT PC AUTO THEFT, MSA not central city per capita"
label var totnpc_ncc_offenses_24c "ACT PC TRCK/BUS THFT, MSA not central city per capita"
label var totnpc_ncc_offenses_25c "ACT PC OTH VHC THEFT, MSA not central city per capita"
label var totnpc_ncc_offenses_26c "ACT PC ALL FIELDS, MSA not central city per capita"
label var totnpc_ncc_offenses_ass "ACT PC AGGRAVATED ASSAULT, MSA not central city per capita"
label var totnpc_ncc_offenses_vc "ACT PC VIOLENT CRIME, MSA not central city per capita"
label var totnpcc_ncc_offenses_1c "ACT PC MURDER, MSA not central city per capita corrected"
label var totnpcc_ncc_offenses_2c "ACT PC MANSLGHTR, MSA not central city per capita corrected"
label var totnpcc_ncc_offenses_3c "ACT PC RAPE TOTL, MSA not central city per capita corrected"
label var totnpcc_ncc_offenses_4c "ACT PC FORC RAPE, MSA not central city per capita corrected"
label var totnpcc_ncc_offenses_5c "ACT  PC ATMPTD RAPE, MSA not central city per capita corrected"
label var totnpcc_ncc_offenses_6c "ACT  PC ROBBRY TOTL, MSA not central city per capita corrected"
label var totnpcc_ncc_offenses_7c "ACT  PC GUN ROBBERY, MSA not central city per capita corrected"
label var totnpcc_ncc_offenses_8c "ACT  PC KNIFE ROBRY, MSA not central city per capita corrected"
label var totnpcc_ncc_offenses_9c "ACT  PC OTH WPN ROB, MSA not central city per capita corrected"
label var totnpcc_ncc_offenses_10c "ACT  PC STR ARM ROB, MSA not central city per capita corrected"
label var totnpcc_ncc_offenses_11c "ACT  PC ASSLT TOTAL, MSA not central city per capita corrected"
label var totnpcc_ncc_offenses_12c "ACT  PC GUN ASSAULT, MSA not central city per capita corrected"
label var totnpcc_ncc_offenses_13c "ACT  PC KNIFE ASSLT, MSA not central city per capita corrected"
label var totnpcc_ncc_offenses_14c "ACT  OTH WPN ASSLT, MSA not central city per capita corrected"
label var totnpcc_ncc_offenses_15c "ACT  HND/FEET ASLT, MSA not central city per capita corrected"
label var totnpcc_ncc_offenses_16c "ACT PC SIMPLE ASSLT, MSA not central city per capita corrected"
label var totnpcc_ncc_offenses_17c "ACT PC BURGLARY TOTL, MSA not central city per capita corrected"
label var totnpcc_ncc_offenses_18c "ACT PC FORCE ENTRY, MSA not central city per capita corrected"
label var totnpcc_ncc_offenses_19c "ACT PC ENTRY-NO FORC, MSA not central city per capita corrected"
label var totnpcc_ncc_offenses_20c "ACT PC ATT BURGLARY, MSA not central city per capita corrected"
label var totnpcc_ncc_offenses_21c "ACT PC LARCENY TOTAL, MSA not central city per capita corrected"
label var totnpcc_ncc_offenses_22c "ACT PC VHC THEFT TOT, MSA not central city per capita corrected"
label var totnpcc_ncc_offenses_23c "ACT PC AUTO THEFT, MSA not central city per capita corrected"
label var totnpcc_ncc_offenses_24c "ACT PC TRCK/BUS THFT, MSA not central city per capita corrected"
label var totnpcc_ncc_offenses_25c "ACT PC OTH VHC THEFT, MSA not central city per capita corrected"
label var totnpcc_ncc_offenses_26c "ACT PC ALL FIELDS, MSA not central city per capita corrected"
label var totnpcc_ncc_offenses_ass "ACT PC AGGRAVATED ASSAULT, MSA not central city per capita corrected"
label var totnpcc_ncc_offenses_vc "ACT PC VIOLENT CRIME, MSA not central city per capita corrected"
label var tot_ncc_oripop1 "Total MSA not central city population under ORI, using pop1"
label var tot_ncc_oripop "Total MSA not central city population under ORI, using pop1+pop2+pop3"
label var tot_ncc_oripop_corr "Total MSA not central city population under ORI, using pop1+pop2+pop3 corrected"
label var totn_cc_offenses_1c "ACT NUM MURDER, city center"
label var totn_cc_offenses_2c "ACT NUM MANSLGHTR, city center"
label var totn_cc_offenses_3c "ACT NUM RAPE TOTL, city center"
label var totn_cc_offenses_4c "ACT NUM FORC RAPE, city center"
label var totn_cc_offenses_5c "ACT NUM ATMPTD RAPE, city center"
label var totn_cc_offenses_6c "ACT NUM ROBBRY TOTL, city center"
label var totn_cc_offenses_7c "ACT NUM GUN ROBBERY, city center"
label var totn_cc_offenses_8c "ACT NUM KNIFE ROBRY, city center"
label var totn_cc_offenses_9c "ACT NUM OTH WPN ROB, city center"
label var totn_cc_offenses_10c "ACT NUM STR ARM ROB, city center"
label var totn_cc_offenses_11c "ACT NUM ASSLT TOTAL, city center"
label var totn_cc_offenses_12c "ACT NUM GUN ASSAULT, city center"
label var totn_cc_offenses_13c "ACT NUM KNIFE ASSLT, city center"
label var totn_cc_offenses_14c "ACT # OTH WPN ASSLT, city center"
label var totn_cc_offenses_15c "ACT # HND/FEET ASLT, city center"
label var totn_cc_offenses_16c "ACT NUM # SIMPLE ASSLT, city center"
label var totn_cc_offenses_17c "ACT NUM # BURGLARY TOTL, city center"
label var totn_cc_offenses_18c "ACT NUM # FORCE ENTRY, city center"
label var totn_cc_offenses_19c "ACT NUM # ENTRY-NO FORC, city center"
label var totn_cc_offenses_20c "ACT NUM # ATT BURGLARY, city center"
label var totn_cc_offenses_21c "ACT NUM # LARCENY TOTAL, city center"
label var totn_cc_offenses_22c "ACT NUM # VHC THEFT TOT, city center"
label var totn_cc_offenses_23c "ACT NUM # AUTO THEFT, city center"
label var totn_cc_offenses_24c "ACT NUM # TRCK/BUS THFT, city center"
label var totn_cc_offenses_25c "ACT NUM # OTH VHC THEFT, city center"
label var totn_cc_offenses_26c "ACT NUM # ALL FIELDS, city center"
label var totn_cc_offenses_ass "ACT NUM # AGGRAVATED ASSAULT, city center"
label var totn_cc_offenses_vc "ACT NUM # VIOLENT CRIME, city center"
label var totnpc_cc_offenses_1c "ACT PC MURDER, city center per capita"
label var totnpc_cc_offenses_2c "ACT PC MANSLGHTR, city center per capita"
label var totnpc_cc_offenses_3c "ACT PC RAPE TOTL, city center per capita"
label var totnpc_cc_offenses_4c "ACT PC FORC RAPE, city center per capita"
label var totnpc_cc_offenses_5c "ACT  PC ATMPTD RAPE, city center per capita"
label var totnpc_cc_offenses_6c "ACT  PC ROBBRY TOTL, city center per capita"
label var totnpc_cc_offenses_7c "ACT  PC GUN ROBBERY, city center per capita"
label var totnpc_cc_offenses_8c "ACT  PC KNIFE ROBRY, city center per capita"
label var totnpc_cc_offenses_9c "ACT  PC OTH WPN ROB, city center per capita"
label var totnpc_cc_offenses_10c "ACT  PC STR ARM ROB, city center per capita"
label var totnpc_cc_offenses_11c "ACT  PC ASSLT TOTAL, city center per capita"
label var totnpc_cc_offenses_12c "ACT  PC GUN ASSAULT, city center per capita"
label var totnpc_cc_offenses_13c "ACT  PC KNIFE ASSLT, city center per capita"
label var totnpc_cc_offenses_14c "ACT  OTH WPN ASSLT, city center per capita"
label var totnpc_cc_offenses_15c "ACT  HND/FEET ASLT, city center per capita"
label var totnpc_cc_offenses_16c "ACT PC SIMPLE ASSLT, city center per capita"
label var totnpc_cc_offenses_17c "ACT PC BURGLARY TOTL, city center per capita"
label var totnpc_cc_offenses_18c "ACT PC FORCE ENTRY, city center per capita"
label var totnpc_cc_offenses_19c "ACT PC ENTRY-NO FORC, city center per capita"
label var totnpc_cc_offenses_20c "ACT PC ATT BURGLARY, city center per capita"
label var totnpc_cc_offenses_21c "ACT PC LARCENY TOTAL, city center per capita"
label var totnpc_cc_offenses_22c "ACT PC VHC THEFT TOT, city center per capita"
label var totnpc_cc_offenses_23c "ACT PC AUTO THEFT, city center per capita"
label var totnpc_cc_offenses_24c "ACT PC TRCK/BUS THFT, city center per capita"
label var totnpc_cc_offenses_25c "ACT PC OTH VHC THEFT, city center per capita"
label var totnpc_cc_offenses_26c "ACT PC ALL FIELDS, city center per capita"
label var totnpc_cc_offenses_ass "ACT PC AGGRAVATED ASSAULT, city center per capita"
label var totnpc_cc_offenses_vc "ACT PC VIOLENT CRIME, city center per capita"
label var totnpcc_cc_offenses_1c "ACT PC MURDER, city center per capita corrected"
label var totnpcc_cc_offenses_2c "ACT PC MANSLGHTR, city center per capita corrected"
label var totnpcc_cc_offenses_3c "ACT PC RAPE TOTL, city center per capita corrected"
label var totnpcc_cc_offenses_4c "ACT PC FORC RAPE, city center per capita corrected"
label var totnpcc_cc_offenses_5c "ACT  PC ATMPTD RAPE, city center per capita corrected"
label var totnpcc_cc_offenses_6c "ACT  PC ROBBRY TOTL, city center per capita corrected"
label var totnpcc_cc_offenses_7c "ACT  PC GUN ROBBERY, city center per capita corrected"
label var totnpcc_cc_offenses_8c "ACT  PC KNIFE ROBRY, city center per capita corrected"
label var totnpcc_cc_offenses_9c "ACT  PC OTH WPN ROB, city center per capita corrected"
label var totnpcc_cc_offenses_10c "ACT  PC STR ARM ROB, city center per capita corrected"
label var totnpcc_cc_offenses_11c "ACT  PC ASSLT TOTAL, city center per capita corrected"
label var totnpcc_cc_offenses_12c "ACT  PC GUN ASSAULT, city center per capita corrected"
label var totnpcc_cc_offenses_13c "ACT  PC KNIFE ASSLT, city center per capita corrected"
label var totnpcc_cc_offenses_14c "ACT  OTH WPN ASSLT, city center per capita corrected"
label var totnpcc_cc_offenses_15c "ACT  HND/FEET ASLT, city center per capita corrected"
label var totnpcc_cc_offenses_16c "ACT PC SIMPLE ASSLT, city center per capita corrected"
label var totnpcc_cc_offenses_17c "ACT PC BURGLARY TOTL, city center per capita corrected"
label var totnpcc_cc_offenses_18c "ACT PC FORCE ENTRY, city center per capita corrected"
label var totnpcc_cc_offenses_19c "ACT PC ENTRY-NO FORC, city center per capita corrected"
label var totnpcc_cc_offenses_20c "ACT PC ATT BURGLARY, city center per capita corrected"
label var totnpcc_cc_offenses_21c "ACT PC LARCENY TOTAL, city center per capita corrected"
label var totnpcc_cc_offenses_22c "ACT PC VHC THEFT TOT, city center per capita corrected"
label var totnpcc_cc_offenses_23c "ACT PC AUTO THEFT, city center per capita corrected"
label var totnpcc_cc_offenses_24c "ACT PC TRCK/BUS THFT, city center per capita corrected"
label var totnpcc_cc_offenses_25c "ACT PC OTH VHC THEFT, city center per capita corrected"
label var totnpcc_cc_offenses_26c "ACT PC ALL FIELDS, city center per capita corrected"
label var totnpcc_cc_offenses_ass "ACT PC AGGRAVATED ASSAULT, city center per capita corrected"
label var totnpcc_cc_offenses_vc "ACT PC VIOLENT CRIME, city center per capita corrected"
label var tot_cc_oripop1 "Total city center population under ORI, using pop1"
label var tot_cc_oripop "Total city center population under ORI, using pop1+pop2+pop3"
label var tot_cc_oripop_corr "Total city center population under ORI, using pop1+pop2+pop3 corrected"
label var fipsplace_00 "FIPS place code 2000"

///Keep only actual offenses
keep *_offenses_* *_oripop* year fipsplace_00 FMSA
 
save rawdata\UCR\data_ucr_plc.dta, replace


///Create map of city centers
use "intermediatedata\data_ucr_plc.dta", clear
egen seq=seq(), by(fipsplace_00)
keep if seq==1
keep fipsplace_00
gen PLCIDFP00=string(fipsplace_00)
replace PLCIDFP00="0"+PLCIDFP00 if fipsplace_00<1000000

outsheet using "rawdata\UCR\places_onlyCC.txt", replace